<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //1.想到一个变量自己加1  num = num + 1 比较麻烦
        var num = 1;// ++num
        num = num + 1;
        console.log(num);
        //2.前置递增运算符 ++写在变量前面
        var age = 10;
        ++age;
        console.log(age);
        //3.先加1 后返回值
        var p = 10;
        console.log(++p + p);//22
    </script>
</head>
<body>

</body>
</html>